using System;
using System.Collections.Generic;
using System.Text;

namespace Objects
{
    public class KhachHangNhanTheKhac
    {
        #region KhachHangNhanTheKhac variables

        private int _Id;
        private String _NguoiNhan;
        
        private String _SoDienThoai;
        private String _ThongDiep;
        private String _DiaChi;
        private String _GhiChu;

        private int _Status;
        private int _SapXep;

        #endregion

        #region KhachHangNhanTheKhac properties

        public int Id
        {
            get { return _Id; }
            set { _Id = value; }
        }

        public String NguoiNhan
        {
            get { return _NguoiNhan; }
            set { _NguoiNhan = value; }
        }

        public String SoDienThoai
        {
            get { return _SoDienThoai; }
            set { _SoDienThoai = value; }
        }

        public String DiaChi
        {
            get { return _DiaChi; }
            set { _DiaChi = value; }
        }

        public String GhiChu
        {
            get { return _GhiChu; }
            set { _GhiChu = value; }
        }

        public String ThongDiep
        {
            get { return _ThongDiep; }
            set { _ThongDiep = value; }
        }

        public int Status
        {
            get { return _Status; }
            set { _Status = value; }
        }

        public int SapXep
        {
            get { return _SapXep; }
            set { _SapXep = value; }
        }

        #endregion

        #region IPopulatable<KhachHangNhanTheKhac> Members

        public KhachHangNhanTheKhac Populate(System.Data.DataRow reader)
        {
            KhachHangNhanTheKhac item = new KhachHangNhanTheKhac();

            try { item.Id = Convert.ToInt32(reader["Id"].ToString()); }
            catch { item.Id = -1; }

            item.NguoiNhan = Convert.ToString(reader["NguoiNhan"].ToString());
           
            item.SoDienThoai = Convert.ToString(reader["SoDienThoai"].ToString());
            item.GhiChu = Convert.ToString(reader["GhiChu"].ToString());
            item.DiaChi = Convert.ToString(reader["DiaChi"].ToString());
            item.ThongDiep = Convert.ToString(reader["ThongDiep"].ToString());

            item.Status = Convert.ToInt32(reader["Status"].ToString());
            item.SapXep = Convert.ToInt32(reader["SapXep"].ToString());

            return item;
        }

        #endregion
    }
}
